package com.design.structure.composite.atguigu;

/**
 * @ProjectName: design
 * @Package: com.design.structure.composite.atguigu
 * @ClassName: OrganizationComponent
 * @Author: shenaiguo
 * @Description: 组织
 * @Date: 2020/9/7 0007 22:50
 */
// 步骤 1
public abstract class OrganizationComponent {
    private String name; // 名 字
    private String des; // 说 明

    protected void add(OrganizationComponent organizationComponent) {
        //默认实现
        throw new UnsupportedOperationException();
    }

    protected void remove(OrganizationComponent organizationComponent) {
        //默认实现
        throw new UnsupportedOperationException();
    }

    //构造器
    public OrganizationComponent(String name, String des) {
        super();
        this.name = name;
        this.des = des;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }
    //方法 print,  做成抽象的,  子类都需要实现
    protected abstract void print();
}
